module.exports = {
  host: '0.0.0.0',
  port: 3034, // 侦听端口, 默认3010
  siteId: 1,
  log: {
    level: 'debug' // 日志输出级别
  },
  cacheControl: {
    'Cache-Control': 'public',
    'Expires': new Date(Date.now() + 12e5).toUTCString() // 页面缓存时间20分钟
  },
  theme: '',
  middlewares: ['301', 'state', 'asset_gulp'], // 'logger', 'requestLogger',
  keepAlive: false, // tcp保持连接复用, API与UI分离时可以开启使用
  keepAliveTimeout: 5000, // 默认5秒，keepAlive:true才生效
  requestTime: false, // 请求时间日志
  session: {
    key: 'koa:sess',
    maxAge: 86400000, //session 过期时间
    redis: {
      host: '127.0.0.1',
      port: 6379,
      db: 0,
      password: null
    }
  },
  redis: {
    clients: {
      redis0: {
        host: '127.0.0.1',
        port: 6001,
        db: 0,
        password: 'root'
      },
      redis1: {
        host: '127.0.0.1',
        port: 6379,
        db: 1,
        password: 'root'
      }
    },
    default: {
      port: 6379,
      db: 0, // database
      keyPrefix: ''
    }
  },
  mysql: {

    // 多库连接
    clients: {
      coin: {
        port: 3306,
        user: 'root',
        password: '(!xfJ0NGYb0b',
        host: '172.16.2.139'

        // port: 3341,
        // user: 'root',
        // password: '(Erciyuan)*2@028',
        // host: 'erciyuan.iok.la',
        // database: 'coin'
      }
    },

    // clients 默认配置,继承此项
    default: {
      user: 'root',
      port: 3306,
      dialect: 'mysql',
      logging: false, // 是否开启日志
      pool: {
        max: 5, // 连接池最大保持连接数（process）
        min: 0,
        acquire: 30000,
        idle: 10000
      },
      timezone: '+08:00'
    }
  },
  mssql: {
    clients: {
      manke: {

        // port: 1433,
        // password: '(Erciyuan)*2@028',
        // host: '172.16.2.139',
        port: 3341,
        password: '(Erciyuan)*2@028',
        host: 'erciyuan.iok.la',
        database: 'manke'
      },
      user_info: {
        port: 3341,
        password: '(Erciyuan)*2@028',
        host: 'erciyuan.iok.la',
        database: 'user_info'
      }
    },
    default: {
      user: 'sa',
      port: 1433,
      dialect: 'mssql',
      logging: true,
      pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
      },
      dialectOptions: {
        useUTC: false,
        multipleStatements: true
      },
      timezone: '+08:00'
    }

  }
};
